#!/usr/bin/python
# coding:utf-8

"""
@author: 信长华
@contact: skywater@gmail.com
@software: PyCharm
@file: model.py
@time: 2021/7/30 14:18
"""
from typing import Optional, List

from pydantic import BaseModel


class UserAO(BaseModel):
    username: str
    password: str


class SysUser(BaseModel):
    username: str
    password: str
    id: int
    email: Optional[str] = None
    full_name: Optional[str] = None
    role: Optional[list] = None


class TextAO(BaseModel):
    text: Optional[str] = None
    text_list: Optional[List[str]] = None
    is_detail: bool = True
